﻿using Medianamik.Core;
using Medianamik.Core.Urls;
using NUnit.Framework;
using Medianamik.Core.Sugar;
using System.Globalization;

namespace Medianamik.Tests.Integration.Medianamik.Core
{
    [TestFixture]
    public class LinkResolverTest
    {

        [SetUp]
        public void Init()
        {
        }

        [Test]
        [Ignore]
        public void LinkResolver_should_resolve_link_and_keep_HTML_encoded()
        {
            var lnk = new LinkResolver(new CultureInfo("fr-CA"), new ObjectFactory<IUrlDictionary>().Get());
            var contentToResolve = @"M+Guardian <a href="".@2d987127-57ea-45e6-b926-ae200ea9170f.@"">M+Guardian</a> M+Guardian";
            var expextedResult = @"M+Guardian <a href=""#"">M+Guardian</a> M+Guardian";
            bool found;

            var contentResolved = lnk.Resolve(contentToResolve, out found);

            Assert.That(contentResolved, Is.EqualTo(expextedResult));
        }

    }
}